﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;

namespace WP7Chess.ViewModels
{
    public class SettingsViewModel : INotifyPropertyChanged
    {
        public PlayerType Player1
        {
            get { return App.GameSetup.Player1; }
            set
            {
                App.GameSetup.Player1 = value;
                FirePropertyChanged("Player1");
            }
        }

        public PlayerType Player2
        {
            get { return App.GameSetup.Player2; }
            set
            {
                App.GameSetup.Player2 = value;
                FirePropertyChanged("Player2");
            }
        }

        public void FirePropertyChanged(string property)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(property));
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }
}
